package com.cn.bean;

/**
 * 部门
 */
public class Department {
    // 部门编号
    private int deptId;
    // 部门名称
    private String deptName;
    // 描述信息
    private String deptDesc;

    public Department() {
        super();
    }

    public Department(String deptName, String deptDesc) {
        super();
        this.deptName = deptName;
        this.deptDesc = deptDesc;
    }

    public Department(int deptId, String deptName, String deptDesc) {
        super();
        this.deptId = deptId;
        this.deptName = deptName;
        this.deptDesc = deptDesc;
    }

    public int getDeptId() {
        return deptId;
    }

    public void setDeptId(int deptId) {
        this.deptId = deptId;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getDeptDesc() {
        return deptDesc;
    }

    public void setDeptDesc(String deptDesc) {
        this.deptDesc = deptDesc;
    }

    /**
     * 请注意该toString()方法返回的值。
     * 只需要返回className即可便于在界面中与JComboBox绑定
     */
    @Override
    public String toString() {
        return deptName;
    }

//    @Override
//    public String toString() {
//        return "Department{" +
//                "deptId=" + deptId +
//                ", deptName='" + deptName + '\'' +
//                ", deptDesc='" + deptDesc + '\'' +
//                '}';
//    }
}
